package com.neusoft.neuiotms.dcam.workflow.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_workorder_ruku_asset_sl")
@org.hibernate.annotations.Table(appliesTo = "neuiot_workorder_ruku_asset_sl", comment = "总行到货验收资产表")
public class RukuAssetSL extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @ManyToOne
    private RukuSL ruku;

    /** 资产分类名 */
    @NotBlank(message = "固定资产分类名不能为空")
    @Length(max = 50, message = "固定资产分类名不能超过{max}位")
    @Column(length = 50)
    private String typeName;

    /** 资产分类编码 */
    @NotBlank(message = "固定资产分类编码不能为空")
    @Length(max = 50, message = "固定资产分类编码不能超过{max}位")
    @Column(length = 50)
    private String typeCode;

    /** 产品名 */
    @Length(max = 50, message = "产品名不能超过{max}位")
    @Column(length = 50, nullable = true)
    private String productName;

    /** 规格型号 */
    @Length(max = 100, message = "规格型号不能超过{max}位")
    @Column(length = 100, nullable = true)
    private String specification;

    /** 原值 */
    @Column(length = 10, nullable = true)
    private Double money;

    /** 维保开始时间 */
    @Column(nullable = true)
    private Date maintenanceStartTime;

    /** 维保结束时间 */
    @Column(nullable = true)
    private Date maintenanceEndTime;

    /** 位置 */
    @Length(max = 255, message = "位置不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String location;

    /** 位置名称 */
    @Length(max = 255, message = "位置名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String locationName;

    /** 计量单位 */
    @Length(max = 255, message = "计量单位不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String measureUnit;

    /** 使用期限 */
    @Length(max = 255, message = "使用期限不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String usePeriod;

    /** 合同项ID */
    @Column(nullable = false)
    private Long itemId;

    /** 序列号 */
    @Length(max = 255, message = "序列号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String serialnumber;

    /** 品牌 */
    @Length(max = 100, message = "品牌不能超过{max}位")
    @Column(length = 100, nullable = true)
    private String brand;

}
